package com.lhj.springboot3.features;

import com.lhj.springboot3.features.bean.Cat;
import com.lhj.springboot3.features.bean.Dog;
import com.lhj.springboot3.features.bean.Pig;
import com.lhj.springboot3.features.bean.Sheep;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author admin
 */
@Slf4j
@SpringBootApplication
public class FeaturesApplication {

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(FeaturesApplication.class);
//        application.setBannerMode(Banner.Mode.OFF);
        ConfigurableApplicationContext context = application.run(args);

        try {
            Cat cat = context.getBean(Cat.class);
            log.info("cat: {}", cat);
        } catch (BeansException ignored) {
            
        }

        try {
            Dog dog = context.getBean(Dog.class);
            log.info("dog: {}", dog);
        } catch (BeansException ignored) {

        }

        try {
            Pig pig = context.getBean(Pig.class);
            log.info("pig: {}", pig);
        } catch (BeansException ignored) {

        }

        try {
            Sheep sheep = context.getBean(Sheep.class);
            log.info("sheep: {}", sheep);
        } catch (BeansException ignored) {

        }

        

    }

}
